package MultiChat;

import java.io.BufferedReader;
import java.io.PrintWriter;

public class ChatClientConsoleReaderThread implements Runnable {
	private ChatClient chatClient = null; //[ek] TODO it's dead code because init by default 
	private BufferedReader reader = null;
	private PrintWriter writer = null;

	ChatClientConsoleReaderThread(ChatClient chatClient, BufferedReader reader, PrintWriter writer) {
		this.chatClient = chatClient;
		this.reader = reader;
		this.writer = writer;
	}
	
	@Override
	public void run() {
		while (true) {
			new Message(reader).sendMessage(writer);
			//chatClient.show(message.getMessage(reader)); //[ek] TODO I will ban next time if I see repeated findings. Dead comment!!!
		}
	}

}
